<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page contentType="text/html; charset=UTF-8" %>
<head>
    <title>提示</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <%@ include file="/view/common/dicCss.jsp"%>
    <%@ include file="/view/common/commonJs.jsp"%>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery.uploadify/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/tydic/tydic_dev.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery/jquery.js"></script> 
    <script type="text/javascript">
        $(function(){
        	var suspectedCustTypeBefore = location.search;
        	var arr=suspectedCustTypeBefore.split("&");
        	var suspectedCustType = arr[0].substr(1); 
        	if(suspectedCustType =="addCust10002" || suspectedCustType =="changNameToAudit10002" ||suspectedCustType =="changName10002" ||suspectedCustType =="realName10002"){
        		$("#suspectedCust1").show();
        		$("#suspectedCust2").show();
        		$("#suspectedCustName").hide();
        		$("#suspectedCustNumber").hide();
        	}else if(suspectedCustType =="addCust10003" || suspectedCustType =="changNameToAudit10003" ||suspectedCustType =="changName10003"||suspectedCustType =="realName10003"){
        		$("#suspectedCust1").hide();
        		$("#suspectedCust2").hide();
        		$("#suspectedCustName").show();
        		$("#suspectedCustNumber").hide();
        	}else if(suspectedCustType =="addCust10005" || suspectedCustType =="changNameToAudit10005" ||suspectedCustType =="changName10005"||suspectedCustType =="realName10005"){
        		$("#suspectedCust1").hide();
        		$("#suspectedCust2").hide();
        		$("#suspectedCustName").hide();
        		$("#suspectedCustNumber").show();
        	}
            var suspectedCust = window.top["suspectedCust"];
            var data = JSON.parse(suspectedCust);
            var datahtml = '<tr style="font-size: 16px"><td>客户名称</td><td>统一社会信用代码</td><td>组织机构代码</td><td>注册地址</td><td>操作</td></tr>';
            for(var i = 0;i<data.length;i++){
                var jtCustName = data[i].jtCustName;
                if(jtCustName =="null" || jtCustName ==null){
                   jtCustName = "";
                }
                var orgUscc = data[i].orgUscc;
                if(orgUscc =="null" || orgUscc ==null){
                   orgUscc = "";
                }
                var certNum = data[i].certNum;
                if(certNum =="null" || certNum ==null){
                   certNum = "";
                }
                var registerAddr = data[i].registerAddr;
                if(registerAddr =="null" || registerAddr ==null){
                   registerAddr = "";
                }
                datahtml+='<tr style="font-size: 16px"><td>' + jtCustName + '</td>';
                datahtml+='<td>' + orgUscc + '</td>';
                datahtml+='<td>' + certNum + '</td>';
                datahtml+='<td>' + registerAddr + '</td>';
                datahtml+='<td><input type="button"value="选择" class="btn14" /></tr>';
            }
            $('#custList').html(datahtml);
            $('#enter').click(function(){
                    window.top.wins.close();
                });
            $('#unEnter').click(
                function(){
                    window.top.wins.close();
                }
            );
            	var ownCust = arr[1];  
		 	if(ownCust==0&&ownCust!=''){
		    	$('.btn14').css("color","gray");
		    }else{
            //以jquery为例实现点击某行获得某个td的数据 

	            $( "#custList tr" ).click( function() {//给每行绑定了一个点击事件 
	                var td = $( this ).find( "td" );//this指向了当前点击的行，通过find我们获得了该行所有的td对象               
	                var CUST_NAME = td.eq( 0 ).html();//通过eq可以得到具体的某个td对象，从而得到相应的数据 
	                var certNum = td.eq( 1 ).html();//通过eq可以得到具体的某个td对象，从而得到相应的数据 
	                var certNum1 = td.eq( 2 ).html();//通过eq可以得到具体的某个td对象，从而得到相应的数据 
	                if(certNum1 != "组织机构代码"){
	                 if(certNum =="" || certNum =="null" || certNum ==null){
	                	 certNum = certNum1;
	                 }
	                if(suspectedCustType =="addCust10002"){
	                if(top.frames["mainFrm"]){
	    				top.frames["mainFrm"].partyCertificationNew.changeNameAndNumber(CUST_NAME,certNum);
	    			}else{
	    				window.parent.partyCertificationNew.changeNameAndNumber(CUST_NAME,certNum);
	    			    }
	                }
	                
	                if(suspectedCustType =="addCust10003"){
	                	 if(top.frames["mainFrm"]){
	         				top.frames["mainFrm"].partyCertificationNew.getSalePathValName(CUST_NAME);
	         			}else{
	         				window.parent.partyCertificationNew.getSalePathValName(CUST_NAME);
	         			}	
	                }
	                
	                if(suspectedCustType =="addCust10005"){
	                	if(top.frames["mainFrm"]){
	         				top.frames["mainFrm"].partyCertificationNew.getSalePathValNumber(certNum);
	         			}else{
	         				window.parent.partyCertificationNew.getSalePathValNumber(certNum);
	         			}
	                }
	                
	               if(suspectedCustType =="changNameToAudit10002"||suspectedCustType =="changName10002"||suspectedCustType =="realName10002"){
	            	   window.top.changeNameAndNumber(CUST_NAME,certNum);
	                }
	               
	               if(suspectedCustType =="changNameToAudit10003"||suspectedCustType =="changName10003"||suspectedCustType =="realName10003"){
	            	   window.top.getSalePathValName(CUST_NAME);                  	 	
	                }
	               
	               if(suspectedCustType =="changNameToAudit10005"||suspectedCustType =="changName10005"||suspectedCustType =="realName10005"){
	            	   window.top.getSalePathValNumber(certNum);                   
	                }
	               window.top.wins.close();
	                }
	                            
	            } );
		    }
        });
    </script>  
     <style type="text/css">
     /* gridtable */
    table.gridtable {
         font-family: verdana,arial,sans-serif;
         font-size:11px;
         color:#333333;
         border-width: 1px;
         border-color: #666666;
        border-collapse: collapse;
     }
     table.gridtable th {
         border-width: 1px;
         padding: 8px;
         border-style: solid;
         border-color: #666666;
         background-color: #dedede;
     }
     table.gridtable td {
         border-width: 1px;
         padding: 8px;
         border-style: solid;
         border-color: #666666;
         background-color: #ffffff;
      }

    
    </style>
</head>
<body>
<div>
    <form>
        <div align="left" style="height: 15px" id = "suspectedCust1"><font style="font-size: 15px">合规性验证不通过：组代无数据，请确认是否以下疑似客户：</font></div>
        <div align="left" style="height: 15px" id = "suspectedCustName"><font style="font-size: 15px">合规性验证不通过：客户名称不一致，正确客户信息如下：</font></div>
        <div align="left" style="height: 15px" id = "suspectedCustNumber"><font style="font-size: 15px">合规性验证不通过：证件号码不一致，正确客户信息如下：</font></div>
        <table width="100%" border="1" cellspacing="0" cellpadding="0" class="gridtable" id="custList" style="margin-top:10px;font-size: 17px;">        


        </table>
        <br />
        <div align="left" style="height: 15px" id = "suspectedCust2"><font style="font-size: 15px;margin-top: 20px;">如非以上疑似客户，请上传证件照片！</font></div>
    </form>
    <br />
    <!--提交按钮  -->
    <div class="mT10 tc">
        <input type="button" id="enter" value="确认" class="btn03" />
        <input type="button" id="unEnter" value="取消" class="btn03" />
    </div>
</div>
</body>
</html>
